package org.jrill;

import java.io.Serializable;

/**
 * Recipient who does not process activity, but merely receives notification at the time of workflow completion.
 * @author Kazuto Waga<kzwaga at gmail.com>
 */
public interface Recipient extends Serializable {
    
    /**
     * Recipient Type.
     */
    public enum Type {
        To, Cc, Bcc
    }
    
    /**
     * Returns ID of this Recipient
     * @return 
     */
    Long getId();
    
    /**
     * Sets ID of this Recipient
     */
    void setId(Long id);
    
    /**
     * Returns version of this Recipient
     * @return 
     */
    Long getVersion();
    
    /**
     * Sets version of this recipient.
     * @param version 
     */
    void setVersion(Long version);
    
    /**
     * Returns participant defined as a recipient.
     * @return a {@link Participant}
     */
    Participant getParticipant();
    /**
     * Returns recipient type.
     * @see Type
     * @return a recipient {@link Type}
     */
    Type getType();
}
